export default {
    data() {
        return {   
        }
    },
    computed: {
    },
    watch: {
        componentName: {
            handler(val) {
               val &&  this.addConfig()
            },
            immediate: true
        },
    },
    methods: {
        // 处理特殊的表单和验证
        addConfig(flag) {
            const component = {
                constructionSiteSurvey: {
                    formItems: [
                        {
                            label: '项目地址',
                            keyName: 'projectAddress',
                            type: 'BaseInput',
                            span: 24,
                            disabled:true
                        }
                    ],
                },
            }
            if (component[this.componentName]) {
                const { formItems, rules } = component[this.componentName]
                formItems && this.formOption.push(...formItems)
                rules && Object.assign(this.rules, rules)
            }
        },
    }
}